import numpy as np
import pylab as pl
from pylab import *
import matplotlib.pyplot as pyplot

data11 = np.loadtxt('fig2.dat')

fig1, axes = plt.subplots(nrows=1, ncols=1,figsize=(10,6))
pl.subplots_adjust(left=0.112, bottom=0.145, right=0.986, top=0.986, 
                   wspace=0.2, hspace=0)

rc('axes', linewidth=1)
pl.xlim(0, 0.05)
pl.ylim(0, 1.8)
pl.xticks([0,0.02,0.04],['0.0','0.02','0.04'], fontsize = 26)
pl.yticks([0,0.5,1,1.5],['0.0','0.5','1.0','1.5'], fontsize = 26)
pl.xlabel(r'$J/U$', fontsize=26, weight='bold',fontstyle='italic')
pl.ylabel(r'$\mu/U$', fontsize=26, weight='bold',fontstyle='italic')
plt.text(0.007, 1.45, r'MI(2)', color='black', fontsize = 26)
plt.text(0.009, 0.4, r'MI(1)', color='black', fontsize = 26)
plt.text(0.0356, 1, r'BG', color='black', fontsize = 26)
plt.text(0.0356, 0.09, r'BG', color='black', fontsize = 26)

ax = plt.gca()
ax.annotate('', xy=(0.036, 1.03), xytext=(0.001, 1.03),
            arrowprops=dict(facecolor='black', edgecolor='black', arrowstyle='->', lw=3))

ax.annotate('', xy=(0.036, 0.12), xytext=(0.0019, 0.12),
            arrowprops=dict(facecolor='black', edgecolor='black', arrowstyle='->', lw=3))


plt.text(0.045,0.8, r'SF', color='black', fontsize = 26)

ax = gca()

pl.plot(data11[:,0], data11[:,2], 'r-',linewidth=3.0)
pl.plot(data11[:,1], data11[:,2], 'b-',linewidth=3.0)

fig1.savefig('phase-db.pdf')
pl.show()
